/*
 * @Author: 'yangyuhang1203' '2621131059@qq.com'
 * @Date: 2025-08-04 17:00:25
 * @LastEditors: 'yangyuhang1203' '2621131059@qq.com'
 * @LastEditTime: 2025-08-04 17:03:01
 * @FilePath: \企业级作业代码\Day16\第一题\Ball.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
public class Ball {
    public void play() {
        System.out.println("玩球");
    }
}
public class Basketball extends Ball {
    @Override
    public void play() {
        System.out.println("打篮球");
    }
}
public class Football extends Ball {
    @Override
    public void play() {
        System.out.println("踢足球");
    }
}